package com.edu.bhu.admin.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.edu.bhu.admin.mapper.LibRepertoryMapper;
import com.edu.bhu.admin.domain.LibRepertory;
import com.edu.bhu.admin.service.ILibRepertoryService;
import com.edu.bhu.common.core.text.Convert;

/**
 * 库存Service业务层处理
 * 
 * @author wangweibo
 * @date 2022-02-16
 */
@Service
public class LibRepertoryServiceImpl implements ILibRepertoryService 
{
    @Autowired
    private LibRepertoryMapper libRepertoryMapper;

    /**
     * 查询库存
     * 
     * @param repId 库存主键
     * @return 库存
     */
    @Override
    public LibRepertory selectLibRepertoryByRepId(Long repId)
    {
        return libRepertoryMapper.selectLibRepertoryByRepId(repId);
    }

    /**
     * 查询库存列表
     * 
     * @param libRepertory 库存
     * @return 库存
     */
    @Override
    public List<LibRepertory> selectLibRepertoryList(LibRepertory libRepertory)
    {
        return libRepertoryMapper.selectLibRepertoryList(libRepertory);
    }

    /**
     * 新增库存
     * 
     * @param libRepertory 库存
     * @return 结果
     */
    @Override
    public int insertLibRepertory(LibRepertory libRepertory)
    {
        return libRepertoryMapper.insertLibRepertory(libRepertory);
    }

    /**
     * 修改库存
     * 
     * @param libRepertory 库存
     * @return 结果
     */
    @Override
    public int updateLibRepertory(LibRepertory libRepertory)
    {
        return libRepertoryMapper.updateLibRepertory(libRepertory);
    }

    /**
     * 批量删除库存
     * 
     * @param repIds 需要删除的库存主键
     * @return 结果
     */
    @Override
    public int deleteLibRepertoryByRepIds(String repIds)
    {
        return libRepertoryMapper.deleteLibRepertoryByRepIds(Convert.toStrArray(repIds));
    }

    /**
     * 删除库存信息
     * 
     * @param repId 库存主键
     * @return 结果
     */
    @Override
    public int deleteLibRepertoryByRepId(Long repId)
    {
        return libRepertoryMapper.deleteLibRepertoryByRepId(repId);
    }
}
